﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using com.fmtx.Model;
using com.fmtx.IDal;

namespace com.fmtx.Dal
{
    public class CountryServer : BaseServer<Country>,ICountry
    {
        public IList<Country> QueryIdAndName()
        {
            var query = from q in db.AllList()
                        select new Country
                        {
                            Id = q.Id,
                            Name = q.Name
                        };
            return query.ToList();
        }


        public IList<Country> QueryByArea(int areaid)
        {
            return db.AllList(w => w.AreaId == areaid).ToList();
        }
    }
}
